package queries;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

public class QueryReader 
{
	public static String getQuery(String name)
	{
		BufferedReader br = null;
		
		try 
		{
			br = new BufferedReader(new FileReader(new File("bin/queries/" + name)));

			StringBuffer sb = new StringBuffer();
			String line = null;
			
			do
			{
				line = br.readLine();
				
				if (line!=null)
					sb.append(line + "\n");
			} while (line!=null);
			
			return sb.toString();
		} 
		catch (Exception e) 
		{
			throw new RuntimeException(e);
		}
	}
}
